<template>
  <view class="wrap" :style="{height:statuHeight+'px'}">
     <top-tab tabTitle="我的设置" @backClick="backClick" backColor="#5B2177"></top-tab>
		 <view class="main">
			<view class="item-list" @click="jump('/pages/my/set/user')">
				<view class="title">个人资料</view>
				<view class="img-icon">
					<image class="img" src="../../../static/home/portrait_a.jpg" mode="aspectFill"></image>
					<uni-icons type="arrowright" color=" #999999" class="iconfont" size="20"></uni-icons>
				</view>
			</view>
	<!-- 		<view class="item-list">
				<view class="title">设置支付密码</view>
				<view class="img-icon">
					<uni-icons type="arrowright" color=" #999999" class="iconfont" size="20"></uni-icons>
				</view>
			</view> -->
<!-- 			<view class="item-list">
				<view class="title">消息通知</view>
				 <switch checked @change="switch1Change" style="transform: scale(0.7,0.7)" />
			</view> -->
			<view class="item-list" @click="jump('/pages/my/set/set_password')">
				<view class="title">更改登录密码</view>
				<view class="img-icon">
					<uni-icons type="arrowright" color=" #999999" class="iconfont" size="20"></uni-icons>
				</view>
			</view>
			<view class="item-list" @click="jump('/pages/my/set/bank_card')">
				<view class="title">银行卡管理</view>
				<view class="img-icon">
					<uni-icons type="arrowright" color=" #999999" class="iconfont" size="20"></uni-icons>
				</view>
			</view>
			<view class="item-list"  @click="switchAccount">
				<view class="title">切换账户</view>
				<view class="img-icon">
					<uni-icons type="arrowright" color=" #999999" class="iconfont" size="20"></uni-icons>
				</view>
			</view>
		</view>
  </view>
</template>

<script>
	import topTab from '@/components/top-tabbar.vue'
  export default {
		components: { topTab },
    data() {
      return {
				statuHeight: uni.getSystemInfoSync().screenHeight,
			}
    },
  onShow() {},
  methods: {
		// 切换账号
		switchAccount() {
			uni.removeStorageSync('AeviceId')
			uni.removeStorageSync('authorization')
			uni.removeStorageSync('user_key')
			this.jump("/pages/login/login")
		},
		// 跳页面
		jump(path) {
			uni.navigateTo({
				url: path
			})
		},
		// 返回
		backClick() {
			uni.switchTab({
			   url: '/pages/my/index'
			});
		}
	}
}
</script>

<style lang="scss" scoped>
	.wrap{
		background: #F2F2F2;	
	}
	.main{
		.item-list{
			display: flex;
			align-items: center;
			justify-content: space-between;
			background-color: #FFFFFF;
			padding: 36rpx 25rpx;
			margin-top: 35rpx;
			.title{
				font-size: 30rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #333333;
			}
			.img-icon{
				display: flex;
				align-items: center;
				.img{
					width: 50rpx;
					height: 50rpx;
					border-radius: 50%;
					margin-right: 16rpx;
				}
				.iconfont{
					font-family: uniicons !important;
				}
			}
		}
	}
</style>
